var o, e = require, t = module, n = exports, i = this && this.__extends || (o = function(t, e) {
    return (o = Object.setPrototypeOf || {
        __proto__: []
    } instanceof Array && function(t, e) {
        t.__proto__ = e;
    } || function(t, e) {
        for (var o in e) e.hasOwnProperty(o) && (t[o] = e[o]);
    })(t, e);
}, function(t, e) {
    function n() {
        this.constructor = t;
    }
    o(t, e), t.prototype = null === e ? Object.create(e) : (n.prototype = e.prototype, 
    new n());
}), a = this && this.__decorate || function(t, e, o, n) {
    var r, i = arguments.length, c = i < 3 ? e : null === n ? n = Object.getOwnPropertyDescriptor(e, o) : n;
    if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) c = Reflect.decorate(t, e, o, n); else for (var a = t.length - 1; 0 <= a; a--) (r = t[a]) && (c = (i < 3 ? r(c) : 3 < i ? r(e, o, c) : r(e, o)) || c);
    return 3 < i && c && Object.defineProperty(e, o, c), c;
};

Object.defineProperty(n, "__esModule", {
    value: !0
});

var r = e("ScrollGames"), s = e("ScrollGameItem"), c = cc._decorator, l = c.ccclass, d = (c.property, 
function(t) {
    function e() {
        return null !== t && t.apply(this, arguments) || this;
    }
    return i(e, t), e.prototype.updateWithData = function(t) {
        var n = this;
        this.scrollview && (this.scrollview.content.width = this.itemtemp.height * Math.ceil(t.length / 2), 
        t.forEach(function(t, e) {
            var o = cc.instantiate(n.itemtemp);
            o.parent = n.scrollview.content, o.setPosition(cc.v2(n.itemtemp.height * Math.floor(e / 2), n.itemtemp.height * (.5 - e % 2))), 
            o.active = !0, o.getComponent(s.default).setInfo({
                appid: t.appid,
                icon: t.icon,
                path: t.path,
                qr_code: t.qr_code,
                is_open_code: t.is_open_code,
                name: t.name
            }, n.type);
        }), this.finish(t));
    }, a([ l ], e);
}(r.default));

n.default = d;